1. Field of the Invention
The present invention relates to image processing technology for detecting a motion vector among a plurality of frame images.
2. Description of the Related Art
For image stabilization and dynamic range enlargement processing in image processing of an image acquired by an image pickup apparatus, such as a digital camera, motion vectors are detected from a plurality of frame images in a video image, and used to align the frame images with one another. The motion vector detecting processing is often performed through template matching.
In the template matching, one of two frame images is set to a reference image, and the other is set to an object image. Then, a template block is set to a rectangular area having a predetermined size in the reference image, and correlations calculated between each of the rectangular areas at a plurality of positions in the object image and the luminance distribution of the template block. The position of the rectangular area having the highest correlation in the object image is a destination of the template block, and a direction to the destination and a moving amount in the object image is a direction and magnitude of the motion vector, on the basis of the position of the template block in the reference image. The motion vector cannot be precisely detected if there is no characteristic texture in the template block in the reference image.
Accordingly, Japanese Patent No. 3935500 discloses a method for extracting a feature point, such as a corner, from a reference image, and for setting the template block so as to include the extracted feature point, improving the detecting reliability of the motion vector.
One detecting method of the motion vector is to detect the following resolution hierarchical motion vector. In detecting the resolution hierarchical motion vector, a plurality of resolution hierarchical images having different resolutions are generated from an input image. Initially, a motion vector is detected from the resolution hierarchical image having the lowest resolution, and a motion vector is sequentially detected in one lower (higher resolution) resolution hierarchical image by referring to the motion vector detected in the resolution hierarchical image in one higher (lower resolution) resolution hierarchical image. Japanese Patent No. 3935500 detects the resolution hierarchical motion vector using the feature point.
However, in extracting the feature point from the resolution hierarchical image, a position of the extracted feature point and a feature amount are often different due to the difference of the resolution of the resolution hierarchical image. In order to detect the resolution hierarchical motion vector, it is thus necessary to consider the difference of the feature point between the higher and lower resolution hierarchical images. However, the method disclosed in Japanese Patent No. 3935500 does not consider the difference of the feature point, and merely detects the motion vector using the feature point extracted from the resolution hierarchical image having the predetermined resolution.